<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
//找出score数组中的最大值，并求其数组的平均值
    let score=[56,78,96,86,53,62,77,24,18];
    let max = score[0],avg,sum=0;
    for(let i=0; i<score.length;i++){
        if(score[i]>max){
          max=score[i];
        }
        sum += score[i]    
     } 
         console.log('最大值：' +max);
         console.log('总数：'+sum);
         avg = sum/score.length;
         console.log('平均数:'+avg);
         console.log(score.length);
         score[220]=45;
          console.log(score.length);
         console.log(score);
         score[221]=34;
         score[score.length]
</script>
</html>